<?php
define(API_EC_FRIEND_LOGIN,500);// 	   = 500;
define(API_EC_FRIEND_SELF,501);
define(API_EC_FRIEND_EXISTS,502);
define(API_EC_FRIEND_SECRET,503);
define(API_EC_FRIEND_ONLYFRIEND,504);
define(API_EC_FRIEND_UPPER,505);
define(API_EC_FRIEND_CANCEL,506);
define(API_EC_FRIEND_NO_USER,507);
define(API_EC_FRIEND_UNKNOWN,508);
define(API_EC_FRIEND_PARAM,509);

class friends_util_exception extends Exception
{
	const API_EC_FRIEND_LOGIN 	   = 500;
	const API_EC_FRIEND_SELF 	   = 501;
	const API_EC_FRIEND_EXISTS 	   = 502;
	const API_EC_FRIEND_SECRET     = 503;
	const API_EC_FRIEND_ONLYFRIEND = 504;
	const API_EC_FRIEND_UPPER 	   = 505;
	const API_EC_FRIEND_CANCEL 	   = 506;
	const API_EC_FRIEND_NO_USER    = 507;
	const API_EC_FRIEND_UNKNOWN    = 508;
	const API_EC_FRIEND_PARAM      = 509;
	
	
	public static $errorDescriptions = array(
		API_EC_FRIEND_LOGIN	   => '请先登录',
		API_EC_FRIEND_SELF	   => '您不能对自己执行该操作',
		API_EC_FRIEND_EXISTS	   => '你们已经是好友了',
		API_EC_FRIEND_RECIVERS   => '没有接收人',
		API_EC_FRIEND_SECRET	   => '该用户拒绝了你的请求',
		API_EC_FRIEND_VCODE	   => '验证码错误',
		API_EC_FRIEND_UPPER	   => '你的好友或对方的好友人数已达到上限',
		API_EC_FRIEND_CANCEL	   => '该用户已取消好友邀请',
		API_EC_FRIEND_NO_USER	   => '无此用户',
		API_EC_FRIEND_UNKNOWN	   => '未知的数据错误',
		API_EC_FRIEND_PARAM	   => '参数缺少或无效'
	);
}
